#pragma once 

#include <list>

using namespace std;

typedef struct _FN_PATCH
{
    DWORD   FnAddr;
	DWORD   OrgnFnCall;
	DWORD   OrgnFn;
} FN_PATCH;

typedef struct _MANILA_TODAY_PATCH_SETTINGS
{
    FN_PATCH   NavigateInComplete;
    FN_PATCH   PrintPageName;
} MANILA_TODAY_PATCH_SETTINGS;

#define ERROR_INVALID_FILE -2


int GenCode(TCHAR* fileName, MANILA_TODAY_PATCH_SETTINGS* settings);
void LoadPatches(list<MANILA_TODAY_PATCH_SETTINGS>* patchList);

int GetLastAppliedPatch(MANILA_TODAY_PATCH_SETTINGS* patch);
void SaveLastAppliedPatch(MANILA_TODAY_PATCH_SETTINGS* patch);